Skip to content

Clarify that repeatable CLI arguments are appended to config file values - #621

Merged
brandond merged 4 commits into
k3s-io:mainfrom
Ryan02I5-Labs:fix-config-repeatable-args
Nov 14, 2026
Merged

brandond merged 4 commits into
k3s-io:mainfrom
Ryan02I5-Labs:fix-config-repeatable-args

Conversation

@Ryan02I5

Copy link
Copy Markdown
Contributor

Fixes #620

The Configuration File section says repeatable CLI arguments overwrite all values in the list. K3s actually combines them:

  • configfilearg inserts the config file values ahead of the CLI arguments.
  • Each later occurrence of a repeatable flag is appended.

This was reproduced on v1.37.2+k3s1 with --disable; #620 has the details.

This changes only the English page. The zh and ja translations contain the same sentence.

K3s inserts config file values ahead of the CLI arguments, and repeatable
flags append each occurrence, so values from both sources are combined
rather than the CLI replacing the list.

Fixes k3s-io#620

Signed-off-by: Ryan02I5 <209603985+Ryan02I5@users.noreply.github.com>
@Ryan02I5

Copy link
Copy Markdown
Contributor Author

Local run of the repository's CI steps on this branch (the workflows are waiting for approval here):

  • codespell 2.4.3 with the repo's .codespellrc: no findings
  • ./scripts/linter.sh: passed
  • Node 22 + Yarn 4.9.4: yarn install --immutable, remark --use remark-validate-links on ./docs, and yarn build (en, ja, zh) all succeeded

The external link check was not run locally.

Comment thread docs/installation/configuration.md Resolved
Use the reviewer's wording for how repeatable CLI arguments combine with
configuration file values, and add an example to the Value Merge Behavior
section.

Signed-off-by: Ryan02I5 <209603985+Ryan02I5@users.noreply.github.com>
@Ryan02I5

Copy link
Copy Markdown
Contributor Author

Thanks @dereknola. I applied your suggestion and added your example to the Value Merge Behavior section in 8169019 (with CHARLIE=FINE written the same way in the command and the result).

For reference, this matches pkg/configfilearg/parser.go: the + suffix controls how a key is merged across the config file and its config.yaml.d drop-ins, and the resulting values are inserted before the CLI arguments, so repeatable CLI flags are added to them.

The failing "Test Links" check comes from an external link in docs/networking/networking-services.md (https://gateway-api.sigs.k8s.io/reference/api-spec/1.4/spec/ returns 404). The same check also fails on other recent pull requests and is unrelated to this change.

Comment thread docs/installation/configuration.md Resolved
Continue the foo/bar/other label keys from the examples above, and describe
how the kubelet resolves duplicate label keys.

Signed-off-by: Ryan02I5 <209603985+Ryan02I5@users.noreply.github.com>

@brandond brandond left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final nit.

Comment thread docs/installation/configuration.md Resolved
Signed-off-by: Ryan02I5 <209603985+Ryan02I5@users.noreply.github.com>
@brandond
brandond merged commit 8f5525c into k3s-io:main Nov 14, 2026
3 of 4 checks passed
@Ryan02I5
Ryan02I5 deleted the fix-config-repeatable-args branch November 14, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configuration file docs: repeatable CLI arguments are appended to config file values, not overwritten

3 participants